package shuaige.jdk.多线程.base.线程类方法使用示例.中断线程;

class 中断条件1_检测isInterrupted为true extends Thread {
    @Override
    public void run() {
        int n = 0;
        // 循环检测
        while (!isInterrupted()) {
            n++;
            System.out.println(n + " hello!");
        }
    }
}
